library MedicCommand initializer init requires LegacySystem

	private function Medic takes nothing returns nothing
		local integer msg = GetRandomInt(1,5)
		if msg==1 then
			call ALICEText(10.0, "Navy Corpsmen are members of the United States Navy Hospital Corps." )
		elseif msg==2 then
			call ALICEText(10.0, "Navy Corpsmen are usually referred to as Corpsmen or Docs." )
		elseif msg==3 then
			call ALICEText(10.0, "The rating of Hospital Corpsman is the most decorated in the United States Navy with at least 22 Medals of Honor (half of all Medals of Honor awarded to the Department of the Navy), 174 Navy Crosses, 31 Distinguished Service Medals, 943 Silver Stars, and 1553 Bronze Stars." )
		elseif msg==4 then
			call ALICEText(10.0, "A Hospital Corpsman named John Bradley was among the group of Marines in the famous flag raising on Mt. Suribachi during the Iwo Jima Campaign." )
		else
			call ALICEText(10.0, "The Hospital Corps was established on 17 June 1898 by act of Congress." )
		endif
		call DisableTrigger(GetTriggeringTrigger())
		call PolledWait(12.)
		call EnableTrigger(GetTriggeringTrigger())
	endfunction

	private function init takes nothing returns nothing
		local trigger t
		local integer i = 0
		set t = CreateTrigger()
		
		loop
			exitwhen i > 11
			call TriggerRegisterPlayerChatEvent(t, Player(i), "medic ", false)
			call TriggerRegisterPlayerChatEvent(t, Player(i), "medic", true)
			set i = i + 1
		endloop

		call TriggerAddAction(t,function Medic)
	endfunction
endlibrary